#%RAML 1.0

title: Password validator module
baseUri: http://api.example.com/{version}
version: v1

documentation:
  - title: mod-password-validator API
    content: This module is performing validation of the password and storing rules for the specified tenant.

types:
  validation_template: !include validation_template.json
  ruleCollection: !include ruleCollection.json
  rule: !include rule.json
  password: !include password.json
  errors: !include raml-util/schemas/errors.schema

traits:
  validate: !include raml-util/traits/validation.raml

/password:
  /validate:
    post:
      is: [validate]
      description: Validate password
      body:
        application/json:
          type: password
      responses:
        200:
          body:
            application/json:
              type: validation_template
        400:
          description: "Bad request"
          body:
            text/plain:
              example: "Bad request"
        500:
          description: "Internal server error"
          body:
            text/plain:
              example: "Internal server error"
